using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Set Network Category</para>
    /// <para>Assigns a network category to a feature class or table at the asset type level to be used during tracing operations.</para>
    /// <para>在资产类型级别将网络类别分配给要素类或表，以便在追踪操作期间使用。</para>
    /// </summary>    
    [DisplayName("Set Network Category")]
    public class SetNetworkCategory : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetNetworkCategory()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the network category.</para>
        /// <para>包含网络类别的公共设施网络。</para>
        /// </param>
        /// <param name="_domain_network">
        /// <para>Domain Network</para>
        /// <para>The domain network in the utility network that contains the network category.</para>
        /// <para>公共设施网络中包含网络类别的域网络。</para>
        /// </param>
        /// <param name="_featureclass">
        /// <para>Input Table</para>
        /// <para>The utility network feature class or table to which the asset type belongs.</para>
        /// <para>资产类型所属的公共设施网络要素类或表。</para>
        /// </param>
        /// <param name="_assetgroup">
        /// <para>Asset Group</para>
        /// <para>The asset group to which the asset type belongs.</para>
        /// <para>资产类型所属的资产组。</para>
        /// </param>
        /// <param name="_assettype">
        /// <para>Asset Type</para>
        /// <para>The asset type to alter the category configuration.</para>
        /// <para>要更改类别配置的资产类型。</para>
        /// </param>
        public SetNetworkCategory(object _in_utility_network, object _domain_network, object _featureclass, object _assetgroup, object _assettype)
        {
            this._in_utility_network = _in_utility_network;
            this._domain_network = _domain_network;
            this._featureclass = _featureclass;
            this._assetgroup = _assetgroup;
            this._assettype = _assettype;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Set Network Category";

        public override string CallName => "un.SetNetworkCategory";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_utility_network, _domain_network, _featureclass, _assetgroup, _assettype, _category, _out_utility_network];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the network category.</para>
        /// <para>包含网络类别的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Domain Network</para>
        /// <para>The domain network in the utility network that contains the network category.</para>
        /// <para>公共设施网络中包含网络类别的域网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Domain Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _domain_network { get; set; }


        /// <summary>
        /// <para>Input Table</para>
        /// <para>The utility network feature class or table to which the asset type belongs.</para>
        /// <para>资产类型所属的公共设施网络要素类或表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _featureclass { get; set; }


        /// <summary>
        /// <para>Asset Group</para>
        /// <para>The asset group to which the asset type belongs.</para>
        /// <para>资产类型所属的资产组。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Asset Group")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _assetgroup { get; set; }


        /// <summary>
        /// <para>Asset Type</para>
        /// <para>The asset type to alter the category configuration.</para>
        /// <para>要更改类别配置的资产类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Asset Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _assettype { get; set; }


        /// <summary>
        /// <para>Categories</para>
        /// <para><xdoc>
        ///   <para>The categories to be assigned to the asset type. The categories that are specified for this parameter will replace the current categories that are assigned to the asset type. To unassign a network category from an asset type, do not specify a category for this parameter.</para>
        ///   <para>The Subnetwork Controller system-provided network category is only available for asset types in the device feature class and junction object table. In a domain network with a partitioned tier definition, the selected asset type must also have a directional terminal configuration assigned with a minimum of one upstream and one downstream terminal.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要分配给资产类型的类别。为此参数指定的类别将替换分配给资产类型的当前类别。要取消从资产类型中分配网络类别，请不要为此参数指定类别。</para>
        ///   <para>子网控制器系统提供的网络类别仅适用于设备要素类和交汇点对象表中的资产类型。在具有分区层定义的域网络中，所选资产类型还必须分配一个定向终端配置，其中至少分配一个上行终端和一个下行终端。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Categories")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _category { get; set; } = null;


        /// <summary>
        /// <para>Updated Utility Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        public SetNetworkCategory SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}